<Canvas Id="CV" >



  <Rectange Id="Rectange0" Width="100" Height="100"  Pivot="TopLeft"  Color="#000000" OnMouseDown="js:MouseDownAnim()" OnMouseUp="js:MouseUpAnim()"/>

</Canvas>
<!--
 <StackPanel Id="Menu" Orientation="Vertical" Dock="Center" Active="false"  >
   <Rectange  Color="#555555" Width="150" Height="30"  Pivot="TopLeft">
     <Rectange Color="#ffffff" Width="149" Height="29" Pivot="TopLeft">
        <Text Text="新建项目" Position="30,-10,0" Color="#000000" Pivot="TopLeft" />
     </Rectange>
   </Rectange>
   <Rectange Color="#555555" Width="150" Height="30"  Pivot="TopLeft">
     <Rectange Color="#ffffff" Width="149" Height="29" Pivot="TopLeft">
        <Text Text="打开项目" Position="30,-10,0" Color="#000000" Pivot="TopLeft" />
     </Rectange>
   </Rectange>
   <Rectange Color="#555555" Width="150" Height="30"  Pivot="TopLeft">
     <Rectange Color="#ffffff" Width="149" Height="29" Pivot="TopLeft">
        <Text Text="保存" Position="30,-10,0" Color="#000000" Pivot="TopLeft" />
     </Rectange>
   </Rectange>
   <Rectange Color="#555555" Width="150" Height="30"  Pivot="TopLeft">
     <Rectange Color="#ffffff" Width="149" Height="29" Pivot="TopLeft">
        <Text Text="关于SGEngine2" Position="30,-10,0" Color="#000000" Pivot="TopLeft" />
     </Rectange>
   </Rectange>
 </StackPanel>
-->
<script type="text/javascript">

   function MouseDownAnim ()
   {
   	 TopWidget.GetId("Rectange0").SetColorRGBA(77.0/255.0,77.0/255.0,77.0/255.0,1.0)
   }

   function MouseUpAnim ()
   {
   //	TopWidget.GetId("Text0").SetColorRGBA(1.0,1.0,1.0,1.0)
   	TopWidget.GetId("Rectange0").SetColorRGBA(1.0/255.0,123.0/255.0,205.0/255.0,1.0)
   }
</script>
